﻿// *************************************************************************************************
// Project: RealSenseLight
// Namespace: RealSenseLight.ViewModels
// File: SdkViewModel.cs  Author: Peter O'Hanlon
// Copyright © Peter O'Hanlon 2014-2015
// Date: 2015/1/3 16:17
// *************************************************************************************************
using RealSense.Light.Contracts;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace RealSenseLight.ViewModels
{
  /// <summary>
  /// ViewModel that encapsulates the Session SDK Version details.
  /// </summary>
  public class SdkViewModel : ViewModelBase, ISdkViewModel
  {
    /// <summary>
    /// Instantiate a new instance of SdkViewModel
    /// </summary>
    public SdkViewModel(ISession session)
    {
      if (session == null)
      {
        Version = "Dev";
        return;
      }
      Version = string.Format("{0}.{1}", session.Version.Major, session.Version.Minor);
    }

    public string Version { get; private set; }
  }
}